package com.ddky.pophome;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;

/**
 * description：
 * Author: 许少东
 * Created: 2/22/21 4:01 PM
 */
public class HomeAdapter extends RecyclerView.Adapter<HomeAdapter.HomeHolder>{
    private Context context;

    public HomeAdapter(Context context){
        this.context = context;
    }

    @NonNull
    @Override
    public HomeHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
        View view = LayoutInflater.from(context).inflate(R.layout.item_home,parent,false);
        return new HomeHolder(view);
    }

    @Override
    public void onBindViewHolder(@NonNull HomeHolder holder, int position) {

    }

    @Override
    public int getItemCount() {
        return 20;
    }

    static class HomeHolder extends RecyclerView.ViewHolder{
        public HomeHolder(@NonNull View itemView) {
            super(itemView);
        }
    }
}
